package com.imu.controller;

import com.imu.domain.User;
import com.imu.service.UserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/users")
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/{username}/{password}")
    public String selectUser(@PathVariable String username,@PathVariable String password){
        boolean b = userService.selectUser(username, password);
        if (b) {
            return "loginSucess";
        }else {
            return "error";
        }
    }

}
